package code07_面向对象.bms;

/**
 * @author 黄衡熙
 * @version 1.0
 * @date 2025年07月22日14:34
 */
public class LoanSavingAccount extends SavingAccount implements Loanable{

    // 贷款金额
    private double loanAmount;

    public double getLoanAmount() {
        return loanAmount;
    }

    public void setLoanAmount(double loanAmount) {
        this.loanAmount = loanAmount;
    }

    @Override
    public void providerLoan(double money) {
        // 由于此处进行了简化,没有审批流程,默认直接贷款成功
        // 因此,贷款后贷款金额发生变化即可
    }

    @Override
    public boolean payLoan(double money) {
        // 由于此处属于贷款的储蓄账户
        // 因此,还贷时要求当前账户余额不低于还贷的金额
        return false;
    }

    @Override
    public double queryLoan() {
        // 查询当前贷款的金额
        return 0;
    }
}